//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Eas.WebCrawler.Test.Model {
    /// <summary>
    /// Summary description for WebFailureExceptionTest
    /// </summary>
    [TestClass]
    public class WebFailureExceptionTest {
        public WebFailureExceptionTest() {
            //
            // TODO: Add constructor logic here
            //
        }

        #region Additional test attributes
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        // Use TestInitialize to run code before running each test 
        // [TestInitialize()]
        // public void MyTestInitialize() { }
        //
        // Use TestCleanup to run code after each test has run
        // [TestCleanup()]
        // public void MyTestCleanup() { }
        //
        #endregion

        [TestMethod]
        /// <summary>Executes the TestSimpleProperties test.</summary>
        public void TestSimpleProperties() {
            System.Exception inner = new Exception();
            Eas.WebCrawler.Model.Core.WebFailureException exception = new Eas.WebCrawler.Model.Core.WebFailureException("hello", 666, inner);
            Assert.AreSame(inner, exception.InnerException);
            Assert.AreEqual<string>("hello", exception.Message);
            Assert.AreEqual<int>(666, exception.ResponseCode);
            exception.ResponseCode = 678;
            Assert.AreEqual<int>(678, exception.ResponseCode);
        }

    }
}
